<%@ page contentType="text/html;charset=utf-8" errorPage="../error.jsp"%>
<%@ page import="java.util.ArrayList"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gbk">
<LINK href="<%=path %>/mok/forum/admin/style/admin.css" type=text/css rel=stylesheet></LINK>
<SCRIPT src="../../forum/js/common.js" type=text/javascript></SCRIPT>
<SCRIPT src="../admin/js/admin.js" type=text/javascript></SCRIPT>
</HEAD>
<BODY topMargin=10>
<TABLE cellSpacing=6 cellPadding=2 width="100%" border=0>
  <TBODY>
  <TR>
    <TD>
      <TABLE class=guide cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><A onclick="parent.location='../index.htm';return false;" href="#">后台管理首页</A>&nbsp;&raquo;&nbsp;添加版块
		  </TD></TR></TBODY></TABLE>
      <FORM id=frmboard name=frmboard  action="addForumDone" method="get">
      <TABLE class=info_tb cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR class=header>
          <TD colSpan=2>添加新版块</TD></TR>
          <tr>
          <td class=altbg1 colSpan=2>
                <s:actionerror cssStyle="color:red"/>
                <s:actionmessage cssStyle="color:green"/>
          </td>
          </tr>
        <TR align=middle>
          <TD class=altbg1 width="45%"><B>版块名称:</B></TD>
          <TD class=altbg2><INPUT size=50 value="新版块名称" name="boardName"></TD></TR>
        <TR align=middle>
          <TD class=altbg1 width="45%"><B>版主姓名:</B></TD>
          <TD class=altbg2><input size=50 value="" name="username" />
		  </TD>
		</TR>
        <TR align=middle>
          <TD class=altbg1 width="45%"><B>是否显示在首页:</B></TD>
          <TD class=altbg2>
	          <select name="isshow">
	           <option value="1">是</option>
	           <option value="0">否</option>
	          </select>
          </TD>
        </TR>		
        </TBODY></TABLE>
      <CENTER><INPUT class=button type=submit value="提 交"></CENTER></FORM>
	</TD>
	</TR>
	</TBODY>
	</TABLE>
<script language="javascript">
function checkfields(theform) {
	if (trim(theform.sectionName.value) == '') {
		alert('新分区名称不能为空');
      	theform.sectionName.focus();
		return;
	}
    var filter = /^\d+$/;
    if (!filter.test(trim(theform.cols.value))) {
    	alert('下级子版块横排数必须为整数');
      	theform.cols.focus();
		return;
    }
	theform.submit();
}
function checkfields2(theform) {
	if (trim(theform.boardName.value) == '') {
		alert('新版块名称不能为空');
      	theform.boardName.focus();
		return;
	}
	if (trim(theform.sectionID.value) == '') {
		alert('上级分区不能为空');
      	theform.sectionID.focus();
		return;
	}
	theform.submit();
}
</script>	  
</BODY></HTML>
